/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Views.GestionRestaurateur;

import Model.Gender;
import java.awt.Component;
import javax.swing.JComboBox;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author ibrahim
 */
public class GenderRenderer implements TableCellRenderer {
    
    private JComboBox combo;
    
    public GenderRenderer(){
        this.combo=new JComboBox(Gender.values());
    }

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        combo.setSelectedItem(value);
        return combo;
    }
    
}
